package cn.com.ege.mvc.service.impl.business;

import java.io.Serializable;

import cn.com.ege.mvc.exception.BusinessException;
import cn.com.ege.mvc.model.business.Supplier;
import cn.com.ege.mvc.service.BaseService;

public class SupplierService extends BaseService<Supplier> implements Serializable{
	public void save(Supplier sp) throws BusinessException{
		if (null != sp && null != sp.getName()) {
			if(null != sp.getId()&& 0 != sp.getId()){
				update(sp);
			}else{
				add(sp);
			}
		}else {
			throw new BusinessException("名称不能为空");
		}
	}
}